package com.yebxxx.server.service.impl;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yebxxx.server.mapper.EmployeeMapper;
import com.yebxxx.server.mapper.EmployeeRemoveMapper;
import com.yebxxx.server.pojo.EmployeeRemove;
import com.yebxxx.server.pojo.EmployeeTrain;
import com.yebxxx.server.pojo.PageBean;
import com.yebxxx.server.service.IEmployeeRemoveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author stx
 * @since 2022-03-23
 */
@Service
public class EmployeeRemoveServiceImpl extends ServiceImpl<EmployeeRemoveMapper, EmployeeRemove> implements IEmployeeRemoveService {
    /**
     * 员工调动
     * @param currentPage
     * @param size
     * @param employeeRemove
     * @return
     */
    @Autowired
    private  EmployeeRemoveMapper employeeRemoveMapper;
    @Autowired
    private EmployeeMapper employeeMapper;
    @Override
    public PageBean RemoveList(Integer currentPage, Integer size, EmployeeRemove employeeRemove) {
        Page<EmployeeRemove> page=new Page<>(currentPage,size);
        IPage<EmployeeRemove> employeeRemoveIPage=employeeRemoveMapper.RemoveList(page,employeeRemove);
        PageBean pageBean=new PageBean(employeeRemoveIPage.getTotal(),employeeRemoveIPage.getRecords());
        return pageBean;

    }

    /**
     * 员工调动
     * @param workId
     * @return
     */
    @Override
    public boolean addEmpRemove(Integer workId) {

        return false;
    }

}
